﻿using SqlSugar; 

namespace TianYu.CMS.Domain.DomainModel
{
    /// <summary>
    /// 系统菜单
    /// </summary>
    [SugarTable("sys_menu")]
    public class SysMenu : AggregateRoot
    {
        /// <summary>
        /// id
        /// </summary>
        [SugarColumn(ColumnName="id",IsNullable = false, IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
		/// <summary>
		/// 背景颜色
		/// </summary>
		[SugarColumn(ColumnName = "back_color", IsNullable = false)]
		public string BackColor { get; set; } 

		/// <summary>
		/// 是否启用
		/// </summary>
		[SugarColumn(ColumnName = "enabled")]
		public bool Enabled { get; set; }

		/// <summary>
		/// 分组
		/// </summary>
		[SugarColumn(ColumnName = "group_id")]
		public int GroupId { get; set; } 

		/// <summary>
		/// Js事件名称
		/// </summary>
		[SugarColumn(ColumnName = "js_event")]
		public string JsEvent { get; set; }

		/// <summary>
		/// 层级
		/// </summary>
		[SugarColumn(ColumnName = "level")]
		public int Level { get; set; }

		/// <summary>
		/// 菜单编码
		/// </summary>
		[SugarColumn(ColumnName = "menu_code")]
		public int MenuCode { get; set; }

		/// <summary>
		/// 菜单图标
		/// </summary>
		[SugarColumn(ColumnName = "menu_icon", IsNullable = false)]
		public string MenuIcon { get; set; }

		/// <summary>
		/// 菜单名称
		/// </summary>
		[SugarColumn(ColumnName = "menu_name")]
		public string MenuName { get; set; }

		/// <summary>
		/// 菜单类型（1＝系统；2＝目录；3＝菜单；4＝按钮）
		/// </summary>
		[SugarColumn(ColumnName = "menu_type", IsNullable = false)]
		public int MenuType { get; set; }

		/// <summary>
		/// 菜单Url
		/// </summary>
		[SugarColumn(ColumnName = "menu_url", IsNullable = false)]
		public string MenuUrl { get; set; } 

		/// <summary>
		/// 父级编码
		/// </summary>
		[SugarColumn(ColumnName = "parent_code", IsNullable = false)]
		public int? ParentCode { get; set; }

		/// <summary>
		/// 父级ID(-1为顶级)
		/// </summary>
		[SugarColumn(ColumnName = "parent_id")]
		public int ParentId { get; set; }

		/// <summary>
		/// 按钮样式
		/// </summary>
		[SugarColumn(ColumnName = "size_style", IsNullable = false)]
		public string SizeStyle { get; set; }

		/// <summary>
		/// 排序
		/// </summary>
		[SugarColumn(ColumnName = "sort")]
		public int Sort { get; set; }

		/// <summary>
		/// 是否自定义
		/// </summary>
		[SugarColumn(ColumnName = "is_toolbar")]
		public bool IsToolbar { get; set; } 
	}
}
